package com.example.springbootmybatis.SingletonDesignModel;

import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

@ToString
@Slf4j
public class SafeSingleton {
    private SafeSingleton(){}

    private SafeSingleton safeSingleton = new SafeSingleton();

    public SafeSingleton getInstance(){
        return safeSingleton;
    }

    public void doSomething(){
        log.info(safeSingleton.toString());
    }
}
